home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Over 1,000 Windows 95 Programs
/
Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso
/
1470
/
3dpercen.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1996-06-08
|
11KB
|
358 lines
VERSION 4.00
Begin VB.Form frm3DPercentMeter
BorderStyle = 3 'Fixed Dialog
Caption = "VBMax 3D Effects Demo - Percentage Meter"
ClientHeight = 3825
ClientLeft = 1440
ClientTop = 2415
ClientWidth = 5130
Height = 4230
Icon = "3DPercentMeter.frx":0000
Left = 1380
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3825
ScaleWidth = 5130
ShowInTaskbar = 0 'False
Top = 2070
Width = 5250
Begin VB.Frame Frame4
Caption = "Meter"
Height = 975
Left = 3360
TabIndex = 25
Top = 1260
Width = 1635
Begin VB.CheckBox Check2
Caption = "Solid bar"
Height = 315
Left = 180
TabIndex = 19
Top = 540
Width = 1395
End
Begin VB.CheckBox Check1
Caption = "Show percent"
Height = 315
Left = 180
TabIndex = 18
Top = 240
Value = 1 'Checked
Width = 1395
End
End
Begin VB.Frame Frame3
Caption = "Fill Color"
Height = 3195
Left = 1740
TabIndex = 24
Top = 120
Width = 1455
Begin VB.CommandButton cmdSelectFillColor
Caption = "Color Dialog"
Height = 315
Left = 180
TabIndex = 27
Top = 2760
Width = 1095
End
Begin VB.OptionButton optFillColor
Caption = "Black"
ForeColor = &H00000000&
Height = 255
Index = 1
Left = 180
TabIndex = 8
Top = 300
Width = 1095
End
Begin VB.OptionButton optFillColor
Caption = "Red"
ForeColor = &H000000FF&
Height = 255
Index = 2
Left = 180
TabIndex = 9
Top = 600
Width = 1095
End
Begin VB.OptionButton optFillColor
Caption = "Green"
ForeColor = &H0000FF00&
Height = 255
Index = 3
Left = 180
TabIndex = 10
Top = 900
Width = 1095
End
Begin VB.OptionButton optFillColor
Caption = "Yellow"
ForeColor = &H0000FFFF&
Height = 255
Index = 4
Left = 180
TabIndex = 11
Top = 1200
Width = 1095
End
Begin VB.OptionButton optFillColor
Caption = "Blue"
ForeColor = &H00FF0000&
Height = 255
Index = 5
Left = 180
TabIndex = 12
Top = 1500
Value = -1 'True
Width = 1095
End
Begin VB.OptionButton optFillColor
Caption = "Magenta"
ForeColor = &H00FF00FF&
Height = 255
Index = 6
Left = 180
TabIndex = 13
Top = 1800
Width = 1095
End
Begin VB.OptionButton optFillColor
Caption = "Cyan"
ForeColor = &H00FFFF00&
Height = 255
Index = 7
Left = 180
TabIndex = 14
Top = 2100
Width = 1095
End
Begin VB.OptionButton optFillColor
Caption = "White"
ForeColor = &H00FFFFFF&
Height = 255
Index = 8
Left = 180
TabIndex = 15
Top = 2400
Width = 1095
End
End
Begin VB.Timer Timer1
Interval = 1
Left = 3300
Top = 2400
End
Begin VB.Frame Frame2
Caption = "Font"
Height = 975
Left = 3360
TabIndex = 22
Top = 120
Width = 1635
Begin VB.CheckBox chkBold
Caption = "Bold"
Height = 315
Left = 180
TabIndex = 16
Top = 240
Value = 1 'Checked
Width = 795
End
Begin VB.CheckBox chkItalic
Caption = "Italic"
Height = 315
Left = 180
TabIndex = 17
Top = 540
Width = 795
End
End
Begin VB.Frame Frame1
Caption = "Text Color"
Height = 3195
Left = 120
TabIndex = 21
Top = 120
Width = 1455
Begin VB.CommandButton cmdSelectTextColor
Caption = "Color Dialog"
Height = 315
Left = 180
TabIndex = 26
Top = 2760
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "White"
ForeColor = &H00FFFFFF&
Height = 255
Index = 8
Left = 180
TabIndex = 7
Top = 2400
Value = -1 'True
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Cyan"
ForeColor = &H00FFFF00&
Height = 255
Index = 7
Left = 180
TabIndex = 6
Top = 2100
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Magenta"
ForeColor = &H00FF00FF&
Height = 255
Index = 6
Left = 180
TabIndex = 5
Top = 1800
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Blue"
ForeColor = &H00FF0000&
Height = 255
Index = 5
Left = 180
TabIndex = 4
Top = 1500
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Yellow"
ForeColor = &H0000FFFF&
Height = 255
Index = 4
Left = 180
TabIndex = 3
Top = 1200
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Green"
ForeColor = &H0000FF00&
Height = 255
Index = 3
Left = 180
TabIndex = 2
Top = 900
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Red"
ForeColor = &H000000FF&
Height = 255
Index = 2
Left = 180
TabIndex = 1
Top = 600
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Black"
ForeColor = &H00000000&
Height = 255
Index = 1
Left = 180
TabIndex = 0
Top = 300
Width = 1095
End
End
Begin VB.CommandButton cmdClose
Cancel = -1 'True
Caption = "Close"
Height = 360
Left = 3720
TabIndex = 20
Top = 2820
Width = 900
End
Begin VB.Label lblStatus
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
ForeColor = &H80000008&
Height = 225
Left = 60
TabIndex = 23
Top = 3480
Width = 4965
End
Attribute VB_Name = "frm3DPercentMeter"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Dim mo3D As New C3D
Private Sub Check1_Click()
If Check1.Value = vbChecked Then
mo3D.ShowPercent = True
Else
mo3D.ShowPercent = False
End If
End Sub
Private Sub Check2_Click()
If Check2.Value = vbChecked Then
mo3D.SolidMeter = True
Else
mo3D.SolidMeter = False
End If
End Sub
Private Sub Form_Load()
CenterForm Me
With mo3D
.SolidMeter = False
.ForeColor = vbWhite
.FillColor = vbBlue
.FontBold = True
End With
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set mo3D = Nothing
Set frm3DPercentMeter = Nothing
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub optColor_Click(Index As Integer)
mo3D.ForeColor = optColor(Index).ForeColor
End Sub
Private Sub chkBold_Click()
If chkBold.Value = vbChecked Then
mo3D.FontBold = True
Else
mo3D.FontBold = False
End If
End Sub
Private Sub chkItalic_Click()
If chkItalic.Value = vbChecked Then
mo3D.FontItalic = True
Else
mo3D.FontItalic = False
End If
End Sub
Private Sub optFillColor_Click(Index As Integer)
mo3D.FillColor = optFillColor(Index).ForeColor
End Sub
Private Sub Timer1_Timer()
Static nPercent As Integer
mo3D.PercentMeter lblStatus, nPercent
nPercent = nPercent + 1
If nPercent > 100 Then nPercent = 0
End Sub
Private Sub cmdSelectTextColor_Click()
mo3D.SelectForeColor
End Sub
Private Sub cmdSelectFillColor_Click()
mo3D.SelectFillColor
End Sub